<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>登录页面</title>
    <script type="text/javascript" src="static/jquery-easyui/jquery.min.js"></script>
    <script type="text/javascript" src="static/jquery-easyui/jquery.easyui.min.js"></script>
    <link type="text/css" rel="stylesheet" href="static/jquery-easyui/themes/default/easyui.css">
    <link type="text/css" rel="stylesheet" href="static/jquery-easyui/themes/default/panel.css">
    <link type="text/css" rel="stylesheet" href="static/jquery-easyui/themes/icon.css">
    <script type="text/javascript" src="static/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
    <style>
        html, body
        {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }

        h1
        {
            color: rgb(128, 128, 128);
            text-align: center;
        }

        a:link, a:hover, a:visited, a:active
        {
            color: rgb(128, 128, 128);
            text-decoration: none;
        }

        form
        {
            width: 400px;
            min-width: 400px;
            position: absolute;
            left: 40%;
            top: 15%;
            margin: 0;
            padding: 30px;
            background-color: white;
            border: 2px solid rgba(128, 128, 128, 0.2);
            border-radius: 10px;
        }

        form div
        {
            margin-bottom: 10px;
        }
    </style>
</head>
<body>
<form action="" method="post" id="loginForm">
    <div>
        <h1>后台登录</h1>
    </div>
    <div>
        <input class="easyui-textbox" id="username" name="username" data-options="iconCls:'icon-man',iconWidth:30,iconAlign:'left',prompt:'用户名'" style="width:100%;height:35px;" />
    </div>
    <div>
        <input class="easyui-passwordbox" id="password" name="password" data-options="iconWidth:30,iconAlign:'left',prompt:'密码'" style="width:100%;height:35px;" />
    </div>
   <!-- <div>
        <input class="easyui-checkbox" id="box" name="box" checked="unchecked" onclick="isOnchage();" label="记住密码" labelPosition="after" labelWidth="70" />
    </div>-->
    <div>
        <input class="easyui-linkbutton" type="button" onclick="ajaxSubmit()" value="登陆" style="width:100%;height:35px;" />
    </div>
</form>

<script type="text/javascript">

    function ajaxSubmit() {
        $.ajax({
            url:'adminLogin',
            type:'POST',
            data:$('#loginForm').serialize(),
            success:function (result) {
                if(result.status==100){
                    alert("登录失败");
                }else if (result.status==200){
                    alert("登录成功");
                    window.location='admin';
                }
            },
            error:function (result) {
                alert("登录失败");
            }
        });
    }
</script>
</body>
</html>